package cn.com.compass;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import cn.com.compass.base.repository.BaseEntityRepositoryFactoryBean;

@SpringBootApplication
@EntityScan("cn.com.compass.entity") // 扫描实体entityManager
@EnableTransactionManagement(proxyTargetClass = true) // 开启事物
@EnableJpaRepositories(value = "cn.com.compass.repository", repositoryFactoryBeanClass = BaseEntityRepositoryFactoryBean.class) // 开启jpa
@MapperScan("cn.com.compass.mapper")
public class App {
	
	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	}
}
